package com.mms.redis.anno;

import org.springframework.cache.annotation.CachePut;
import org.springframework.cache.annotation.Caching;
import java.lang.annotation.*;

/**
 * Created by dan3652@sina.com on 2017-01-17 14:01.
 */
@Caching(put = {
        @CachePut(value = "user", key = "'user_id_'+#user.id"),
        @CachePut(value = "user", key = "'user_username_'+#user.username"),
        @CachePut(value = "user", key = "'user_pwd_'+#user.email"),
        @CachePut(value = "user", key = "'user_age_'+#user.age")
})
@Target({ElementType.METHOD, ElementType.TYPE})
@Retention(RetentionPolicy.RUNTIME)
@Inherited
public @interface UserSaveCache {
}
